package cn.edu.baiyunu.myapplication.data.repository

import cn.edu.baiyunu.myapplication.data.model.SavingsGoal
import kotlinx.coroutines.flow.Flow

/**
 * 储蓄目标仓库接口
 */
interface SavingsGoalRepository {
    /**
     * 获取所有储蓄目标
     */
    fun getAllSavingsGoals(): Flow<List<SavingsGoal>>
    
    /**
     * 根据ID获取储蓄目标
     */
    fun getSavingsGoalById(id: String): Flow<SavingsGoal?>
    
    /**
     * 添加储蓄目标
     */
    suspend fun addSavingsGoal(savingsGoal: SavingsGoal)
    
    /**
     * 更新储蓄目标
     */
    suspend fun updateSavingsGoal(savingsGoal: SavingsGoal)
    
    /**
     * 删除储蓄目标
     */
    suspend fun deleteSavingsGoal(id: String)
    
    /**
     * 获取储蓄进度
     */
    fun getSavingsProgress(): Flow<Map<String, Double>>
} 